/* GameObject.java
 * 
 * Alfred Olschnoegger
 * 22.05.2008
 */

package domain;

import domain.location.Position;


/**
 * Abstract Class for Object on the Game Field
 *
 * @date 22.05.2008
 * @author Alfred Olschnoegger
 */

public abstract class GameObject {
	
		// static part of this class
	private static int s_LastID = 0;
	
	
	// dynamic part of this class
	private int m_ID;
	protected Position m_Pos;
	
	/**
	 * default constructor 
	 */
	public GameObject() {
		m_Pos = null;
	}
	
	/**
	 * constructor with position setter
	 * @param pos position to start
	 */
	public GameObject(Position pos) {
		m_Pos = pos;
	}
	
	/**
	 * 
	 * @return id of the game object
	 */
	public int getID() {
		return m_ID;
	}
	
	/**
	 * 
	 * @param id the id which should be assigned to the object
	 */
	public void setID(int id) {
		m_ID = id;
	}
	
	
	/**
	 * uses the game object on the field
	 * @param game 
	 * @param hunt 
	 */
	public abstract void use(Hunter hunt, Game game);
	
	/**
	 * @return current position of the object
	 */
	public Position getPos() {
		return m_Pos;
	}

	/**
	 * 
	 * @param pos sets the position of the object
	 */
	public void setPos(Position pos) {
		m_Pos = pos;
	}
	

}


// end of GameObject.java
